package com.applcn.user.repo.entity;

import com.applcn.core.base.BaseEntity;
import com.applcn.user.constant.MenuTypeEnum;
import lombok.Data;

/**
 * com.applcn.user.repo.entity
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-03-08 23:57
 */
@Data
public class MenuEntity extends BaseEntity implements Comparable<MenuEntity> {

    private static final long serialVersionUID = -4226737247912132573L;

    /**
     * 父级菜单id,最顶级菜单默认为0
     */
    private Long parentId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 路由名称
     */
    private String route;

    /**
     * 类型
     */
    private MenuTypeEnum menuType;

    /**
     * 路径
     */
    private String url;

    /**
     * 图标
     */
    private String icon;

    /**
     * 排序值
     */
    private Integer sort;

    @Override
    public int compareTo(MenuEntity o) {
        int i = this.getSort() - o.getSort();
        return i;
    }
}
